import Vue from "vue";
 import Vuex from "vuex";
 import { getStorage } from "@/utils/storage";
 import state from "./state";
 import mutations from "./mutations";
 import actions from "./actions";
//  import getters from "./getters";
 Vue.use(Vuex);
 
 const store = new Vuex.Store({
   state,
   mutations,
   actions,
  //  getters
 });
 

//  刷新需要保存的数据（token）
const systemToken = getStorage("systemToken");
systemToken&&store.dispatch("SaveUsertoken", systemToken);

//  刷新需要保存的数据（path）
const systemPath = getStorage("systemPath");
systemPath&&store.dispatch("SavePath", systemPath);

 export default store;
 